// stylelint-disable property-blacklist
@mixin transition($transition...) {
  @if $enable-transitions {
    @if length($transition) == 0 {
      transition: $transition-base;
    } @else {
      transition: $transition;
    }
  }

  @if $enable-prefers-reduced-motion-media-query {
    $isolate: false;
    @each $selector in $pseudo-vendor-prefixes {
      @if str-index(quote(#{&}), $selector) {
        $isolate: true;
      }
    }

    @if $isolate {
      @media (prefers-reduced-motion: reduce) {
        transition: none;
      }
    } @else {
      @extend %no-transition;
    }
  }
}
